#include <iostream>
#include "../inc/Pulse.hxx"
#include "../inc/Utils.hxx"

using namespace std;

double Pulse::PULSE_LENGTH = 0.0002;

Pulse::Pulse(double amplitude) {    //tutaj tworze impuls
    int n = 15; //ilosc probek impulsu, scisle zwiazana jest z jego dlugoscia i czestotliwoscia probkowania
    vector<double> x = Utils::linspace(-M_PI/2, M_PI/2, n);
    vector<double>::iterator iterator;
    for(iterator = x.begin(); iterator != x.end(); ++iterator) {
        double real = amplitude * cos(*iterator)*cos(*iterator);
        double imag = *iterator;
        complex<double> sample(real, imag);
        cout << sample << endl;
        push_back(sample);
    }
}

